package org.cuatrovientos.mazmorra;

import java.util.Random;

/**
 * Represent a dice
 * @author david_berrade
 *
 */
public class Dice {

	//attributes
	private int sides;
	
	
	
	
	
	/**
	 * constructor given number of slides
	 * @param sides
	 */
	public  Dice (int sides){
		
		this.sides=sides;
		
	}
	
	
	//methods
	/**
	 * roll the dice
	 * @return value
	 */
	public int roll (){
		Random random = new Random();
		return random.nextInt(sides)+1;
		
		
		
	}
	
	
	
}
